<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查询用户列表</title>
	<style type="text/css">
		.border{
			border: 0px;
		}
	</style>
</head>
<body> 
<form action="${pageContext.request.contextPath }/queryUser2.action" method="post">
查询条件：<a href="/itemList2.action">商品列表</a>
<table width="100%" border=1>
<tr>
<td>用户名：<input type="text" name="user.username"/> </td>
<td>商品名：<input type="text" name="item.name"/> </td>
<td><input type="submit" value="查询"/></td>
</tr>
</table>
用户列表：
<table width="100%" border=1>
<tr>
	<td>选中</td>
	<td>用户名</td>
	<td>用户出生日期</td>
	<td>性别</td>
	<td>用户头像</td>
	<td>地址</td>
	<td>操作</td>
</tr>
<c:forEach items="${userList }" var="user" varStatus="u">
<tr>
	<td><input class="border" type="checkbox" name="ids" value="${user.id}"></td>
	<td><input class="border" typpe="text" name="userList[${u.index}].id" value="${user.id }" /></td>
	<td><input class="border" typpe="text" name="userList[${u.index}].username" value="${user.username }" /></td>
	<td>
		<%--<input typpe="text" name="userList[${u.index}].birthday" value="${user.birthday}" />--%>
		<fmt:formatDate value="${user.birthday}" pattern="yyyy-MM-dd HH:mm:ss"/>
	</td>
	<td><input class="border" typpe="text" name="userList[${u.index}].sex" value="${user.sex }" /></td>
	<td>
		<c:if test="${user.pic !=null}">
			<img src="/pic/${user.pic}" width=100 height=100/>
			<br/>
		</c:if>
		<%--<input type="file"  name="pictureFile"/>--%>
	</td>
	<td><input class="border" typpe="text" name="userList[${u.index}].address" value="${user.address }"/></td>
	<td><a href="userEdit.action?id=${user.id}">修改</a></td>

</tr>
</c:forEach>

</table>
</form>
</body>

</html>